<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@include file="../layout/_head_css.jsp"%>
</head>
<body>
<%@include file="../layout/_menu.jsp"%>
<!-- Dashboard Wrapper Start -->
<div class="dashboard-wrapper">
    <%@include file="../layout/_head_header.jsp"%>
    <!-- Main Container Start -->
    <div class="main-container">
        <!-- Top Bar Starts -->
        <div class="top-bar clearfix">
            <div class="page-title">
                <h4><div class="fs1" aria-hidden="true" data-icon="&#xe0a0;"></div>Default Layout <a href="invoice.html" class="samll">Bonus Pages</a></h4>
            </div>
            <ul class="right-stats hidden-xs" id="mini-nav-right">
                <li class="reportrange btn btn-success">
                    <i class="fa fa-calendar"></i>
                    <span></span> <b class="caret"></b>
                </li>
                <li>
                    <a href="#" class="btn btn-info sb-open-right sb-close">
                        <div class="fs1" aria-hidden="true" data-icon="&#xe06a;"></div>
                    </a>
                </li>
            </ul>
        </div>
        <!-- Top Bar Ends -->
        <!-- Container fluid Starts -->
        <div class="container-fluid">
            <!-- Spacer starts -->
            <div class="spacer-xs">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4>订单列表</h4>
                    </div>
                    <div class="panel-body">
                        <table class="table table-bordered " border="1" width="100%" >
                            <tr align="center">
                                <td>订单编号</td>
                                <td>下单时间</td>
                                <td>用户ID</td>
                                <td>总金额</td>
                                <td>订单状态</td>
                                <td>来源</td>
                                <td>收货人电话</td>
                                <td>收货人姓名</td>
                                <td>收货人地址</td>
                                <td>操作</td>
                            </tr>

                            <c:forEach var="goods" items="${goodsList}">
                                <tr align="center">
                                    <td>${goods.goods_no}</td>
                                    <td>
                                        <fmt:formatDate value="${goods.sell_time}" pattern="yyyy-MM-dd HH:mm" />
                                    </td>
                                    <td>${goods.goods_uid}</td>
                                    <td>
                                        <fmt:formatNumber value="${goods.amount}" pattern="0.00" />
                                    </td>
                                    <td>
                                            ${goods.status.text}
                                    </td>
                                    <td>${goods.sources.text}</td>
                                    <td>${goods.customer_tel}</td>
                                    <td>${goods.customer_name}</td>
                                    <td>${goods.address}</td>
                                    <td>
                                        <c:if test="${goods.status=='NO_PAYMENT'}">
                                            <a  href="/goods/payment?goods_id=${goods.goods_id}" class="btn btn-sm btn-warning btn_payment">支付</a>
                                            <a class="btn btn-sm btn-danger">取消</a>
                                        </c:if>
                                    </td>
                                </tr>
                            </c:forEach>
                        </table>
                    </div>
                </div>
            </div>
            <!-- Spacer ends -->

        </div>
        <!-- Container fluid ends -->
    </div>
    <!-- Main Container Start -->

    <!-- Footer Start -->
    <%@include file="../layout/_footer.jsp"%>
    <!-- Footer end -->
</div>
<!-- Dashboard Wrapper End -->

<%@include file="../layout/_footer_js.jsp"%>
<script language="JavaScript" src="style\app\js\goods.js"></script>
</body>
</html>